a=[1,2,3,'42134','241',(431,2.3)]
s=0
for i in a:
    try:
        s+=i

    except :
        pass
print(s)
def func(n):
    for i in range(len(n)):
        if n[i]==n[i-1]-10:
            continue
        else:
            n[i]=n[i-1]-10
    return n
a=[1,2,3,4,5,6,7]
print(func(a))

def func(n):
        try:
            for i in range(len(n)):
                if n[i]+10==n[i+1]:
                    continue
                else:
                    n[i+1]=n[i]+10

        except:
            pass
        return n


a=[1,2,3,4,5,6,7]
print(func(a))
